'use strict';

/**
 * @ngdoc function
 * @name campusRecruitingApp.controller:CalendarCtrl
 * @description
 * # CalendarCtrl
 * Controller of the campusRecruitingApp
 */



angular.module('campusRecruitingApp')
    .controller('CalendarCtrl', function ($scope) {
   
    $scope.cities=[
        {name:"Shanghai"},
        {name:"Beijing"},
        {name:"Chongqing"},
        {name:"Dalian"},
        {name:"Guangzhou"},
        {name:"Nanjing"},
        {name:"Ningbo"},
        {name:"Qingdao"},
        {name:"Shanghai"},
        {name:"Shenzhen"},
        {name:"Suzhou"},
        {name:"Tianjin"},
        {name:"Wuhan"},
        {name:"Xiamen"},
        {name:"Xi'an"}
    ];
    $scope.allCities=[
        {name:"Shanghai"},
        {name:"Beijing"},
        {name:"Chongqing"},
        {name:"Dalian"},
        {name:"Guangzhou"},
        {name:"Nanjing"},
        {name:"Ningbo"},
        {name:"Qingdao"},
        {name:"Shanghai"},
        {name:"Shenzhen"},
        {name:"Suzhou"},
        {name:"Tianjin"},
        {name:"Wuhan"},
        {name:"Xiamen"},
        {name:"Xi'an"},
        {name:"HangKong"},
        {name:"Macau"}
    ];
    $scope.oneAtATime = true;
    $scope.citySchoolHash = {
        'Shanghai': [
            {name:'JiaotongUniversity', date:'aa',time:'v', address: 'xxxxxxxxx'},
            {name:'ECNU',date:'eeeeeeeeeeee',time:'vvvvvvvv', address:'xxxxxxxxx'}
        ],
        'Beijing': [],
        'HangKong':[{name:'JiaotongUniversity', date:'aa',time:'v', address: 'xxxxxxxxx'}]
    };
    $scope.currCity = "Shanghai";

    $scope.queryCityData = function(cityName) {
        $scope.schools = $scope.citySchoolHash[cityName];
        $scope.currCity = cityName;
    };

});
